FROM java:8
ENV JAVA_OPTS "-server -XX:+UseG1GC -Xms3550m -Xmx3550m -Xss512k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -Xloggc:/jvm_log/app_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/jvm_log/java_heapdump.hprof -XX:-UseLargePages -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dspring.profiles.active=prod"
ENV TZ=Asia/Almaty
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN mkdir -p /jvm_log/
ADD target/db-syncer.jar db-syncer.jar
EXPOSE 80
ENTRYPOINT ["sh","-c","java ${JAVA_OPTS} -jar db-syncer.jar"]
